home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip Hitware 7 A
/
CHIP_HITWARE_7A.iso
/
internet
/
Webmaster
/
_SETUP.4
/
Group3
/
IE4 clock.jav
< prev
next >
Wrap
Text File
|
1998-12-30
|
1KB
|
56 lines
<!---BeginTitle--->Real time DHTML Clock<!---BeginJAVHead---><!---BeginJAVBody---><div id=Clock align=center style="font-family: Verdana; font-size: 40; color:#0000FF">á</div>
<script>
/*Real time DHTML Clock By Paul Swonger AKA "PSYCO" written exclusively for use on the "HTMLGOODIES" website. Feel free to distribute freely (as long as credit is given).*/
function tick() {
var hours, minutes, seconds, ap;
var intHours, intMinutes, intSeconds;
var today;
today = new Date();
intHours = today.getHours();
intMinutes = today.getMinutes();
intSeconds = today.getSeconds();
if (intHours == 0) {
hours = "12:";
ap = "Midnight";
} else if (intHours < 12) {
hours = intHours+":";
ap = "A.M.";
} else if (intHours == 12) {
hours = "12:";
ap = "Noon";
} else {
intHours = intHours - 12
hours = intHours + ":";
ap = "P.M.";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
timeString = hours+minutes+seconds+ap;
Clock.innerHTML = timeString;
window.setTimeout("tick();", 100);
}
window.onload = tick;
</script>
<P><!--EndJAVBody-->